package cn.yh.action;

import cn.yh.biz.AdminBiz;
import cn.yh.model.Admin;

public class AdminLoginAction extends BaseAction {
	private String aname;
	private String apwd;

	public String execute() {

		AdminBiz ab = new AdminBiz();
		Admin admin = ab.adminLogin(aname, apwd);

		if (admin != null) {
			getSession().setAttribute("Admin",admin);
			return "success";
		}
		return "fail";

	}

	public String getAname() {
		return aname;
	}

	public void setAname(String aname) {
		this.aname = aname;
	}

	public String getApwd() {
		return apwd;
	}

	public void setApwd(String apwd) {
		this.apwd = apwd;
	}

}
